package q1.project.modules.system.role.model;

import java.time.LocalDateTime;
import java.util.List;
import q1.project.core.base.PageQuery;
import q1.project.modules.system.role.common.MenuTypeEnum;

/**
 * @author Q1 Team
 */
public final class MenuVm {
  private MenuVm() {}

  public static class MenuQuery extends PageQuery {
    private String keyword;
    private Integer menuType;

    public String getKeyword() {
      return keyword;
    }

    public void setKeyword(String keyword) {
      this.keyword = keyword;
    }

    public Integer getMenuType() {
      return menuType;
    }

    public void setMenuType(Integer menuType) {
      this.menuType = menuType;
    }
  }

  @lombok.Data
  public static class MenuResponse {
    private String id;
    private String parentId;
    private String menuCode;
    private String menuName;
    private MenuTypeEnum menuType;
    private String path;
    private String component;
    private String icon;
    private Integer sortOrder;
    private String remark;
    private Boolean enabled;
    private List<MenuResponse> children;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
  }

  public record MenuCreate(
      String id,
      String parentId,
      String menuCode,
      String menuName,
      MenuTypeEnum menuType,
      String path,
      String component,
      String icon,
      Integer sortOrder,
      String remark,
      Boolean enabled) {}
}
